package com.doctcloud.hisinfo.medrec.controller;

import com.doctcloud.common.core.domain.R;
import com.doctcloud.hisinfo.histable.domain.medrec.PatMasterIndexDo;
import com.doctcloud.hisinfo.medrec.service.IPatMasterIndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value = "/medrec/")
public class PatMasterIndexController {
    @Autowired
    private IPatMasterIndexService patMasterIndexService;
    @GetMapping("/patmasterindex/querybyid/{patientId}")
    public R<PatMasterIndexDo> selectById(@PathVariable("patientId") String patientId){
        return R.ok(patMasterIndexService.getById(patientId));
    }

    @GetMapping("/patmasterindex/querybyids")
    public R<List<PatMasterIndexDo>> selectByIds(@RequestParam("patientIds") List<String> patientIds){
        return R.ok(patMasterIndexService.getByIds(patientIds));
    }
}
